 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1.0" />
	<meta name="description" content="Xenon Boostrap Admin Panel" />
	<meta name="author" content="" /> 
	<title>ASTS-客户工作台-登录</title> 
 	<link rel="stylesheet" href="/customer_plat/public/javascripts/adminAssets/css/fonts/linecons/css/linecons.css">
	<link rel="stylesheet" href="/customer_plat/public/javascripts/adminAssets/css/fonts/fontawesome/css/font-awesome.min.css">
	<link rel="stylesheet" href="/customer_plat/public/javascripts/adminAssets/css/bootstrap.css">
	<link rel="stylesheet" href="/customer_plat/public/javascripts/adminAssets/css/xenon-core.css">
	<link rel="stylesheet" href="/customer_plat/public/javascripts/adminAssets/css/xenon-forms.css">
	<link rel="stylesheet" href="/customer_plat/public/javascripts/adminAssets/css/xenon-components.css">
	<link rel="stylesheet" href="/customer_plat/public/javascripts/adminAssets/css/xenon-skins.css">
	<link rel="stylesheet" href="/customer_plat/public/javascripts/adminAssets/css/custom.css">
	<script src="/customer_plat/public/javascripts/adminAssets/js/jquery-1.11.1.min.js"></script>
	<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
	<!--[if lt IE 9]>
		<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
		<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
	<![endif]-->
</head>
<body class="page-body login-page">
	<div class="login-container">
		<div class="row">
			<div class="col-sm-6">
				<script type="text/javascript">
					if(self!=top){ 
						//超时，父框架刷新，重新登陆
						parent.location.reload();
					}
					
					//暂停服务
					jQuery(document).ready(function($)
					{
							
						setTimeout(function(){ $(".fade-in-effect").addClass('in'); }, 1);
						
						$("form#login .form-group:has(.form-control):first .form-control").focus();
					});
					//回车登录
					document.onkeydown = function(e) {
						if (!e)
							e = window.event;
						if ((e.keyCode || e.which) == 13) {
							loginDo();
						}
					}
					var flag = true;
					function loginDo(){
						var loginUrl = "@{login.LoginAction.loginDo}";
						var homeUrl = "@{home.HomeAction.home}"
						if(flag){
							if($("#userName").val()==""){
								$("#error").html("请输入用户名.");
								return false;
							}
							else if($("#password").val()==""){
								$("#error").html("请输入密码.");
								return false;
							}else{
								$("#error").html("");
								flag = false;
							}
							var param = {};
							param["userName"] = $("#userName").val();
							param["password"] = $("#password").val();
							$.post(loginUrl, param, function(data){
								if(data.ret == "1"){
									window.location.href = homeUrl;
								} else {
									$("#error").html(data.msg);
									flag = true;
								}
							})
						}
					}
				</script>
				
				<!-- Errors container -->
				<div class="errors-container">
				</div>
				<!-- Add class "fade-in-effect" for login form effect -->
				<div method="post"  action="loginDo.htm" id="login" class="login-form fade-in-effect">
					<div class="login-header">
						<a href="javascript:void(0)" class="logo">
							<span style="color: white;font-size: 22pt;font-weight:bold; font-family: '微软雅黑';" >ASTS</span>
							<span>customer platform</span>
						</a>
						<p>尊敬的管理员, 欢迎回来!</p>
					</div>
					<div class="form-group">
						<input type="text" class="form-control input-dark" name="userName" id="userName" placeholder="账号" autocomplete="off" />
					</div>
					<div class="form-group">
						<input type="password" class="form-control input-dark" name="password" id="password"  placeholder="密码" autocomplete="off" />
					</div>
					<span style="color: red; line-height: 40px;" id="error"></span>
					<div class="form-group">
						<button type="submit" id="myform"  class="btn btn-dark  btn-block text-left" onclick="loginDo()">
							<i class="fa-lock"></i>
							登录
						</button>
					</div>
				</div>
				<div><a style="color:white;" href="http://www.miitbeian.gov.cn">粤ICP备14069922号-1</a></div>
			</div>
			
		</div>
	</div>
    </html>


